import os
inputDir = input("源文件夹:")
for root,dirs,files in os.walk(r""+inputDir):
    for file in files:
        #获取文件所属目录
        # print(root)
        #获取文件路径exit
        print(os.path.join(root,file))
inputFile = input("输入任意退出:")        